<template>
	<div id="MainBox">
		<form id="form01">
		    用户账号：<input name="adminAccount" value="root222"/>
		    密码：<input name="password" value="123abc456"/>
		    <input type="button" value="登录" id="bt01" @click="btn01()">
		</form>
	</div>
</template>

<script>
	import $ from "jquery";
	export default{
		methods:{
			btn01:function(){
				var data01=$("#form01").serialize()
				let fthis=this;
				$.ajax({
					url:"http://47.104.66.120:8081/admin/login",
					data:data01,
					success:function (data) {
						let message="失败";
						message=data.message;
						fthis.$message({
							showClose: true,
							message: '登录'+message,
							type: 'success'
						});
						localStorage.setItem("token",data.obj);
						fthis.$router.push("/cartManage")
					}
				})
			},
			
		},
	}
</script>

<style>
</style>
